<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<link rel="stylesheet" type="text/css" href="/static/css/hw-admin.css">
	<link rel="stylesheet" href="/static/css/lb.css"> 
    <style>
        #edui1_iframeholder,#edui1 {
            width: 853px !important;
        }
        #account-table input {
            width: 100%;
            height: 100%;
            border: none;
        }
        #allmap,#container {
            width: 500px;
            height: 250px;
        }
    </style>
   	<!--[if lt IE 9]>
    　 <script src="https://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
       <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.js"></script>
    <![endif]-->
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=WloYy83KwAZE3EVH3n4qBQ2o4SLEImfX"></script>
</head>
<body>

    <div class="hw-iframe">
        
        <!-- 顶部标题 -->
        <div class="hw-header-wrapper">
            <div class="hw-header">
                <div class="hw-header__item--left">
                    <?=isset($find) ? '编辑酒店服务' : '新增酒店服务' ?>
                </div> 
            </div>
        </div>
        <form action="" method="POST" id="main-form">
            <div class="hw-group">
                <div class="group-title">基本信息</div>

                <div class="group-info">
                    <div class="group-item">
                        <div class="hw-input-label">
                            <div class="name">服务名称<span>*</span></div>
                            <div class="form-control">
                                <input class="hw-input" maxlength="7" type="text" name="name" value="<?=isset($find) ? $find['name'] : '' ?>" required>
                            </div>
                        </div>
                        <div class="hw-input-label">
                            <div class="name">标签名称</div>
                            <div class="form-control">
                                <input class="hw-input" maxlength="7"  type="text" name="label" value="<?=isset($find) ? $find['label'] : '' ?>" >
                            </div>
                        </div>
                    </div>

                    <div class="group-item">
                        <div class="hw-input-label">
                            <div class="name">服务介绍</div>
                            <div class="form-control">
                                <script id="editor-container" name="info" required type="text/plain"><?=isset($find) ? $find['info'] : '' ?></script>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="group-operate" style="background: #fff;">
                    <div class="hw-container">
                        <a class="hw-btn hw-default-btn"  href="#" onclick="history.go(-1)">返回</a>
                        <button class="hw-btn">保存</button>
                    </div>
                </div>
            </div>
        </form>
    </div>

	<script src="/static/lib/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="/static/lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="/static/lib/jquery.form.min.js"></script>
    <script type="text/javascript" src="/static/js/common/util.js"></script>
	<script type="text/javascript" src="/static/js/common/upload.js"></script>
	<script type="text/javascript" src="/static/lib/jquery.validate.js"></script>
	<script type="text/javascript" src="/static/lib/messages_zh.js"></script>
	<script type="text/javascript" src="/static/js/common/validateExtend.js"></script>
	<script type="text/javascript" src="/static/js/common/common.js"></script>
    <script type="text/javascript" src="/static/js/PCASClass.js"></script>
    <script type="text/javascript" src="/static/lib/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="/static/lib/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript" src="/static/lib/ueditor/addCustomizeDialog.js"></script>
    <script>
        var Form = $('#main-form');
        Form.validate();
        Form.on('submit',function() {
        try {
            if (Form.valid()) {
                if(ue.getContent()=='') {
                    $.alert('请填写图文详情！')
                    return false;
                }
                Form.submitForm(function(info){
                    if(info.code==1){

                        setTimeout(function(){
                               history.back(-1);
                        },800)
                        
                    }else {
                        $.alert(info.msg);
                    }
                    return;
                });
            }
        } catch(e) {
            console.error(e);
	    }
        return false;
    });
    </script>
</body>
</html>